SRAlertRecord
METADATA
| Attribute | Value |
|---|---|
| Topic | 3985-parent-orders |
| MLink Token | ClientTrading |
| Product | SRTrade |
| accessType | SELECT |
Table Definition
| Field | Type | Key | Default Value | Comment |
|---|---|---|---|---|
| accnt | VARCHAR(16) | PRI | '' | SpiderRock trading accnt broker pkey |
| clientFirm | VARCHAR(16) | PRI | '' | SR client firm |
| userName | VARCHAR(24) | PRI | '' | |
| alertType | VARCHAR(24) | PRI | '' | |
| alertSource | VARCHAR(24) | PRI | '' | |
| alertPriority | enum - AlertPriority | PRI | 'None' | |
| histWindow | INT | PRI | 0 | counter 10 most recent event window |
| alertText | TINYTEXT | '' | ||
| counter | INT | 0 | ||
| timestamp | DATETIME(6) | '1900-01-01 00:00:00.000000' | timestamp of last modification |
PRIMARY KEY DEFINITION (Unique)
| Field | Sequence |
|---|---|
| accnt | 1 |
| clientFirm | 2 |
| userName | 3 |
| alertType | 4 |
| alertSource | 5 |
| alertPriority | 6 |
| histWindow | 7 |
CREATE TABLE EXAMPLE QUERY
CREATE TABLE `SRTrade`.`MsgSRAlertRecord` (
`accnt` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SpiderRock trading accnt [broker pkey]',
`clientFirm` VARCHAR(16) NOT NULL DEFAULT '' COMMENT 'SR client firm',
`userName` VARCHAR(24) NOT NULL DEFAULT '',
`alertType` VARCHAR(24) NOT NULL DEFAULT '',
`alertSource` VARCHAR(24) NOT NULL DEFAULT '',
`alertPriority` ENUM('None','Low','High') NOT NULL DEFAULT 'None',
`histWindow` INT NOT NULL DEFAULT 0 COMMENT 'counter % 10 (most recent event window)',
`alertText` TINYTEXT NOT NULL DEFAULT '',
`counter` INT NOT NULL DEFAULT 0,
`timestamp` DATETIME(6) NOT NULL DEFAULT '1900-01-01 00:00:00.000000' COMMENT 'timestamp of last modification',
PRIMARY KEY USING HASH (`accnt`,`clientFirm`,`userName`,`alertType`,`alertSource`,`alertPriority`,`histWindow`)
) ENGINE=SRSE DEFAULT CHARSET=LATIN1 COMMENT='';
SELECT TABLE EXAMPLE QUERY
SELECT
`accnt`,
`clientFirm`,
`userName`,
`alertType`,
`alertSource`,
`alertPriority`,
`histWindow`,
`alertText`,
`counter`,
`timestamp`
FROM `SRTrade`.`MsgSRAlertRecord`
WHERE
/* Replace with a VARCHAR(16) */
`accnt` = 'Example_accnt'
AND
/* Replace with a VARCHAR(16) */
`clientFirm` = 'Example_clientFirm'
AND
/* Replace with a VARCHAR(24) */
`userName` = 'Example_userName'
AND
/* Replace with a VARCHAR(24) */
`alertType` = 'Example_alertType'
AND
/* Replace with a VARCHAR(24) */
`alertSource` = 'Example_alertSource'
AND
/* Replace with a ENUM('None','Low','High') */
`alertPriority` = 'None'
AND
/* Replace with a INT */
`histWindow` = 5;
Doc Columns Query
SELECT * FROM SRTrade.doccolumns WHERE TABLE_NAME='SRAlertRecord' ORDER BY ordinal_position ASC;